<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css柱状图</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
        }
        html {
            height: 100%;
        }
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
        }
        .box {
            width: 256px;
            height: 256px;
            text-align: justify;
            border-bottom: 1px dashed #dedede;
        }
        .box::before,.box::after {
            content:"";
            display: inline-block;
        }
        .box::before {
            height: 100%;
        }
        .box::after {
            width: 100%;
        }
        .bar {
            display: inline-block;
            width: 20px;
        }
        .bar:first-of-type {
            background-color: #f15252;
            height: 156px;
        }
        .bar:nth-of-type(2) {
            background-color: #f1e152;
            height: 56px;
        }
        .bar:nth-of-type(3) {
            background-color: #92f152;
            height: 106px;
        }
        .bar:nth-of-type(4) {
            background-color: #52f1c9;
            height: 76px;
        }
        .bar:nth-of-type(5) {
            background-color: #52b7f1;
            height: 32px;
        }
        .bar:nth-of-type(6) {
            background-color: #5262f1;
            height: 15px;
        }
        .bar:nth-of-type(7) {
            background-color: #f152f1;
            height: 175px;
        }
        .bar:nth-of-type(8) {
            background-color: #a952f1;
            height: 152px;
        }
        .bar:nth-of-type(9) {
            background-color: #f152af;
            height: 255px;
        }
        .bar:nth-of-type(8) {
            background-color: #f1527a;
            height: 234px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
        <div class="bar"></div>
    </div>
</body>
</html>